home *** CD-ROM | disk | FTP | other *** search
- package G;
-
- import H.Z;
- import J.I;
- import java.io.InputStream;
- import org.jrra.network.Communicator;
-
- // $FF: renamed from: G.C
- public class class_0 {
- private I available;
- private B notify;
- private Object notifyAll = new Object();
- private Object read = new Object();
- private int start;
- private boolean wait;
-
- private class_0(I var1, A.I var2) {
- this.available = var1;
- this.notify = B.I(var1, var2, this);
- this.wait = false;
- }
-
- // $FF: renamed from: I (H.Z) void
- public final void method_0(Z var1) {
- this.available(var1, 10, -1);
- }
-
- public final void available(Z var1, int var2, int var3) {
- (new Thread(new G.Z(this, var1, var2, var3, (Communicator.1)null))).start();
-
- while(!this.wait) {
- Object var4 = this.notifyAll;
- synchronized(var4) {
- try {
- this.notifyAll.wait();
- } catch (InterruptedException var7) {
- }
- }
- }
-
- var1.B();
- }
-
- // $FF: renamed from: I (java.io.InputStream, H.Z, int) void
- public final void method_1(InputStream var1, Z var2, int var3) {
- int var5 = 0;
-
- int var4;
- while((var4 = var1.available()) != 0) {
- ++var5;
- byte[] var6 = new byte[var4 > var3 ? var3 : var4];
- var1.read(var6);
- var2.I(var6);
- }
-
- }
-
- // $FF: renamed from: I (J.I, A.I) G.C
- public static final class_0 method_2(I var0, A.I var1) {
- return new class_0(var0, var1);
- }
-
- // $FF: renamed from: I () void
- public final void method_3() {
- this.wait = true;
- this.notify.I();
- Object var1 = this.notifyAll;
- synchronized(var1) {
- this.notifyAll.notifyAll();
- }
-
- try {
- Object var2 = this.read;
- synchronized(var2) {
- this.read.wait(50L);
- }
- } catch (InterruptedException var5) {
- }
-
- }
-
- private synchronized void read() {
- ++this.start;
- }
-
- private synchronized void start() {
- --this.start;
- if (this.start == 0) {
- Object var1 = this.read;
- synchronized(var1) {
- this.read.notify();
- }
- }
-
- }
-
- // $FF: renamed from: I (G.C) void
- static final void method_4(class_0 var0) {
- var0.read();
- }
-
- // $FF: renamed from: Z (G.C) boolean
- static final boolean method_5(class_0 var0) {
- return var0.wait;
- }
-
- // $FF: renamed from: C (G.C) G.B
- static final B method_6(class_0 var0) {
- return var0.notify;
- }
-
- // $FF: renamed from: B (G.C) void
- static final void method_7(class_0 var0) {
- var0.start();
- }
- }
-